import { axios } from '@/utils/request'

const api = {
  auditList: '/share-holder/audit-list',
  audit: '/share-holder/batch-audit',
  editLevel: '/share-holder/update-level',
  level: '/share-holder/level-list',
  deleteLevel: '/share-holder/delete-level',
  allLevel: 'share-holder/level',
  list: 'share-holder/list',
  editShareholder: 'share-holder/edit',
  shareOrder: 'share-holder/share-order',
  pool: 'share-holder/pool',
  sendPool: 'share-holder/send-pool',
  poolDetail: 'share-holder/pool-detail',
  junior: 'share-holder/level-one-user',
  poolMan: 'share-holder/pool-man',
  commission: 'share-holder/profit-list',
  shareCommission: 'share-holder/share-profit-list',
  cashList: 'share-holder/cash-list',
  cashApply: 'share-holder/cash-apply',
  cashConfirm: 'share-holder/cash-confirm',
  setting: 'share-holder/setting',
  settingInfo: 'share-holder/setting-info',
  levelDetail: 'share-holder/level-detail',
  submitApplyInfo: 'share-holder/submit-other-info',
  applyInfo: 'share-holder/other-info',
  shareHolderAdd: 'share-holder/add',
  shareHolderGetFilter: 'share-holder/get-filter',
  oldShareList: 'share-holder/old-share-list',
  chainShareList: 'share-holder/chain-share-list',
  shareFrostLogList: 'share-holder/share-frost-log-list',
  delShareHolderTestInfo: 'store/del-share-holder-test-info',
}

export default api

export function oldShareList(parameter) {
  return axios({
    url: api.oldShareList,
    method: 'get',
    params: parameter,
  })
}

export function chainShareList(parameter) {
  return axios({
    url: api.chainShareList,
    method: 'get',
    params: parameter,
  })
}

export function auditList(parameter) {
  return axios({
    url: api.auditList,
    method: 'get',
    params: parameter,
  })
}

export function audit(parameter) {
  return axios({
    url: api.audit,
    method: 'post',
    data: parameter,
  })
}
export function level(parameter) {
  return axios({
    url: api.level,
    method: 'get',
    params: parameter,
  })
}
export function editLevel(parameter) {
  return axios({
    url: api.editLevel,
    method: 'post',
    data: parameter,
  })
}

export function deleteLevel(parameter) {
  return axios({
    url: api.deleteLevel,
    method: 'post',
    data: parameter,
  })
}
export function allLevel(parameter) {
  return axios({
    url: api.allLevel,
    method: 'get',
    params: parameter,
  })
}
export function list(parameter) {
  return axios({
    url: api.list,
    method: 'get',
    params: parameter,
  })
}
export function editShareholder(parameter) {
  return axios({
    url: api.editShareholder,
    method: 'post',
    data: parameter,
  })
}
export function shareOrder(parameter) {
  return axios({
    url: api.shareOrder,
    method: 'get',
    params: parameter,
  })
}
export function pool(parameter) {
  return axios({
    url: api.pool,
    method: 'get',
    params: parameter,
  })
}
export function sendPool(parameter) {
  return axios({
    url: api.sendPool,
    method: 'post',
    data: parameter,
  })
}
export function poolDetail(parameter) {
  return axios({
    url: api.poolDetail,
    method: 'get',
    params: parameter,
  })
}
export function junior(parameter) {
  return axios({
    url: api.junior,
    method: 'get',
    params: parameter,
  })
}
export function poolMan(parameter) {
  return axios({
    url: api.poolMan,
    method: 'get',
    params: parameter,
  })
}
export function commission(parameter) {
  return axios({
    url: api.commission,
    method: 'get',
    params: parameter,
  })
}

export function shareCommission(parameter) {
  return axios({
    url: api.shareCommission,
    method: 'get',
    params: parameter,
  })
}

export function cashList(parameter) {
  return axios({
    url: api.cashList,
    method: 'get',
    params: parameter,
  })
}
export function cashApply(parameter) {
  return axios({
    url: api.cashApply,
    method: 'post',
    data: parameter,
  })
}
export function cashConfirm(parameter) {
  return axios({
    url: api.cashConfirm,
    method: 'post',
    data: parameter,
  })
}
export function setting(parameter) {
  return axios({
    url: api.setting,
    method: 'post',
    data: parameter,
  })
}
export function settingInfo(parameter) {
  return axios({
    url: api.settingInfo,
    method: 'get',
    params: parameter,
  })
}
export function levelDetail(parameter) {
  return axios({
    url: api.levelDetail,
    method: 'get',
    params: parameter,
  })
}
export function submitApplyInfo(parameter) {
  return axios({
    url: api.submitApplyInfo,
    method: 'post',
    data: parameter,
  })
}
export function applyInfo(parameter) {
  return axios({
    url: api.applyInfo,
    method: 'get',
    params: parameter,
  })
}
export function shareHolderAdd(parameter) {
  return axios({
    url: api.shareHolderAdd,
    method: 'post',
    data: parameter,
  })
}
export function shareHolderGetFilter(parameter) {
  return axios({
    url: api.shareHolderGetFilter,
    method: 'get',
    params: parameter,
  })
}

export function shareFrostLogList(params) {
  return axios({
    url: api.shareFrostLogList,
    method: 'get',
    params,
  })
}

export function delShareHolderTestInfo(data) {
  return axios({
    url: api.delShareHolderTestInfo,
    method: 'post',
    data,
  })
}

export function getHolderLevelLog(params) {
  return axios({
    url: '/share-holder/get-holder-level-log',
    method: 'get',
    params,
  })
}

export function getHolderOutLog(params) {
  return axios({
    url: '/share-holder/get-holder-out-log',
    method: 'get',
    params,
  })
}

export function teamOrderList(params) {
  return axios({
    url: '/share-holder/team-order-list',
    method: 'get',
    params,
  })
}
